package com.masterclient.app.businessmodule.homemodule.presenter.data;

import com.masterclient.app.businessmodule.homemodule.bean.footertab.HomeFooterTabBean;
import com.masterclient.app.businessmodule.homemodule.bean.saletabs.FlashSaleTabBean;

import java.util.List;
/**
* 临时缓存
* */
public class HomeApiDataManager {

    //是否首次加载成功
    private boolean isFirstLoad;

    //商品分类变量
    private int footerTabIndex = 0;
    //限时购
    private List<FlashSaleTabBean> flashSaleTabs;
    //搜索词
    private List<String> searchWords;
    //底部tab
    private List<HomeFooterTabBean>tabBeanList;

    public List<HomeFooterTabBean> getTabBeanList() {
        return tabBeanList;
    }

    public void setTabBeanList(List<HomeFooterTabBean> tabBeanList) {
        this.tabBeanList = tabBeanList;
    }

    public int getFooterTabIndex() {
        return footerTabIndex;
    }

    public void setFooterTabIndex(int footerTabIndex) {
        this.footerTabIndex = footerTabIndex;
    }

    public List<FlashSaleTabBean> getFlashSaleTabs() {
        return flashSaleTabs;
    }

    public void setFlashSaleTabs(List<FlashSaleTabBean> flashSaleTabs) {
        this.flashSaleTabs = flashSaleTabs;
    }

    public List<String> getSearchWords() {
        return searchWords;
    }

    public void setSearchWords(List<String> searchWords) {
        this.searchWords = searchWords;
    }

    public boolean isFirstLoad() {
        return isFirstLoad;
    }

    public void setFirstLoad(boolean firstLoad) {
        isFirstLoad = firstLoad;
    }

    /**
    * 清空缓存
    * */
    public void clearCache() {
        footerTabIndex = 0;
        if (tabBeanList != null) {
            tabBeanList.clear();
        }
        if (flashSaleTabs != null) {
            flashSaleTabs.clear();
        }
        if (searchWords != null) {
            searchWords.clear();
        }
    }
}
